package ace.module.common.core.test.core.dao.entity;

import ace.cmp.spring.data.jdbc.querydsl.core.annotations.LogicDelete;
import ace.cmp.spring.graphql.core.model.PageContent;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.relational.core.mapping.Table;

/**
 * @author caspar
 * @date 2023/8/22 17:02
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("mms_book")
public class MmsBook implements PageContent, Cloneable {

  @Id
  private Long id;
  private Long appId;
  private Long authorId;
  private String name;
  @LogicDelete
  private Long deleteFlag;

  /**
   * 更新时间
   */
  @LastModifiedDate
  private Long updateTime;

  /**
   * 创建时间
   */
  @CreatedDate
  private Long createTime;

  /**
   * 版本号和乐观锁字段,初始为0，更新自增1
   */
  @Version
  private Long rowVersion;


}
